package com.stylefeng.guns.modular.netcar.warpper;

import com.stylefeng.guns.core.base.warpper.BaseControllerWarpper;
import com.stylefeng.guns.core.common.constant.factory.ConstantFactory;
import com.stylefeng.guns.core.common.constant.state.ChcekNumType;
import org.apache.commons.lang3.StringUtils;

import java.util.Map;

/**
 * 部门列表的包装
 *
 * @author fengshuonan
 * @date 2017年4月25日 18:10:31
 */
public class OrderLineWarpper extends BaseControllerWarpper {

    public OrderLineWarpper(Object list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
        String ostId= (String) map.get("ostId");//车辆服务类型
        map.put("ostName", ConstantFactory.me().getOrderTypeByOtCoe("2",ostId));
        String otId= (String) map.get("otId"); //订单类型
        map.put("otName", ConstantFactory.me().getOrderTypeByOtCoe("0",otId));
        String checkResult=(String)map.get("checkResult");//审核类型
        if(StringUtils.isNotBlank(checkResult))
        map.put("checkResultName", ChcekNumType.valueOf(Integer.parseInt(checkResult)));
      }

}
